package test.net.loader
{
	import flash.display.MovieClip;
	import flash.display.Sprite;
	import flash.events.Event;
	
	import org.net.loader.ResManager;
	import org.net.loader.ResourceData;
	import org.net.loader.SwfLoader;

	public class TestSwfLoader extends Sprite
	{		
		[Before]
		public function setUp():void
		{
		}
		
		[After]
		public function tearDown():void
		{
		}
		
		[BeforeClass]
		public static function setUpBeforeClass():void
		{
		}
		
		[AfterClass]
		public static function tearDownAfterClass():void
		{
		}
		
		
		[Test]
		public function testSwfLoader():void {
			ResManager.instance.add(new SwfLoader(new ResourceData("../asset/swf/TIP.swf","tip")));
			ResManager.instance.add(new SwfLoader(new ResourceData("../asset/swf/loading_init.swf","load_init")));
			ResManager.instance.addEventListener(Event.COMPLETE, completeHandler);
			ResManager.instance.load();
		}
		
		
		private function completeHandler(event : Event) : void {
			var btn_ok_DB:MovieClip = ResManager.instance.getMovieClip("tip", "HtmlText_TIP_view")
			var mc:MovieClip = ResManager.instance.getMovieClip("load_init", "loading_init")
			addChild(btn_ok_DB);
			addChild(mc);
		}
		
	}
}